/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package flames.view;

import com.sun.awt.AWTUtilities;
import flames.utils.SwingUtils;

import java.awt.*;
import javax.swing.*;

/**
 * @author 10373
 */
public class MainFrame extends javax.swing.JFrame {

    //白色、橙色
    private Point pressedPoint;
    // 普通颜色
    public final Color NORMAL_COLOR = new Color(132, 132, 132);   // #848484
    // active 颜色
    public final Color ACTIVE_COLOR = new Color(242, 135, 24);    // #f28718

//    private final MenuFrame menu = new MenuFrame(null);

    private MenuDialog menu = null;

    /**
     * Creates new form NewJFrame
     */
    public MainFrame() {
        this.setUndecorated(true);     // 只有在窗体不可显示时才调用此方法
        this.setResizable(false);   // 设置不可以重置窗口大小
        this.getContentPane().setBackground(Color.white);   // 设置背景颜色
        this.setSize(1230, 810);
        this.setLocationRelativeTo(null);       // 设置窗口居中
        initComponents();
        // 将其它面板设置为关闭, 不可以显示的状态
        this.SecurityToolsPane.setVisible(false);
        this.DefenseCenterPane.setVisible(false);
        this.AccessControlPane.setVisible(false);
        // logo
        this.setIconImage(SwingUtils.buildImage("/flames/images/mainFrame/subLogo_64.png"));
        //美化返回按钮: 让他们变得透明
        SwingUtils.beautifyButtonToTransparent(returnButton);
        SwingUtils.beautifyButtonToTransparent(returnButton1);
        SwingUtils.beautifyButtonToTransparent(returnButton2);
        AWTUtilities.setWindowOpacity(this, 0.99f);  // 设置透明度
        AWTUtilities.setWindowOpaque(this, false);  // 设置通透
        Head.setOpaque(true);   // 设置透明
        Head1.setOpaque(true);   // 设置透明
        Head2.setOpaque(true);   // 设置透明
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ShadowLayeredPane = new DropShadowPanel(15);
        mainLayeredPane = new javax.swing.JLayeredPane();
        downSide = new javax.swing.JLabel();
        Quick_Check_Area_Button = new javax.swing.JButton();
        Quick_Check_Font_Label = new javax.swing.JLabel();
        Quick_Check_IMAGE_Label = new javax.swing.JLabel();
        Defense_Center_Area_Button = new javax.swing.JButton();
        Defense_Center_Font_Label = new javax.swing.JLabel();
        Defense_Center_IMAGE_Label = new javax.swing.JLabel();
        Access_Control_Area_Button = new javax.swing.JButton();
        Access_Control_Font_Label = new javax.swing.JLabel();
        Access_Control_IMAGE_Label = new javax.swing.JLabel();
        Security_Tools_Area_Button = new javax.swing.JButton();
        Security_Tools_Font_Label = new javax.swing.JLabel();
        Security_Tools_IMAGE_Label = new javax.swing.JLabel();
        mainBKG = new javax.swing.JLabel();
        title = new javax.swing.JLabel();
        subTitle = new javax.swing.JLabel();
        subLogo = new javax.swing.JLabel();
        DefenseCenterPane = new javax.swing.JLayeredPane();
        SecurityToolsBKG1 = new javax.swing.JLabel();
        Head1 = new javax.swing.JLabel();
        returnButton1 = new javax.swing.JButton();
        defenseLabel = new javax.swing.JLabel();
        AccessControlPane = new javax.swing.JLayeredPane();
        SecurityToolsBKG2 = new javax.swing.JLabel();
        Head2 = new javax.swing.JLabel();
        returnButton2 = new javax.swing.JButton();
        accessControl = new javax.swing.JLabel();
        SecurityToolsPane = new javax.swing.JLayeredPane();
        SecurityToolsBKG = new javax.swing.JLabel();
        Head = new javax.swing.JLabel();
        returnButton = new javax.swing.JButton();
        securityTools = new javax.swing.JLabel();
        existButton = new javax.swing.JButton();
        moreBtn = new javax.swing.JButton();
        minimizeButton = new javax.swing.JButton();
        MenuArea = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                formMouseDragged(evt);
            }
        });
        addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                mainFrameMousePressed(evt);
            }
        });

        ShadowLayeredPane.setBackground(new java.awt.Color(255, 255, 255));

        mainLayeredPane.setPreferredSize(new java.awt.Dimension(1265, 892));
        mainLayeredPane.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        downSide.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/main_downSide.png"))); // NOI18N
        mainLayeredPane.add(downSide, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 470, 1230, 410));

        Quick_Check_Area_Button.setFont(new java.awt.Font("宋体", 0, 30)); // NOI18N
        Quick_Check_Area_Button.setFocusPainted(false);
        Quick_Check_Area_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                Quick_Check_Area_ButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                Quick_Check_Area_ButtonMouseExited(evt);
            }
        });
        Quick_Check_Area_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Quick_Check_Area_ButtonActionPerformed(evt);
            }
        });
        mainLayeredPane.add(Quick_Check_Area_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 570, 200, 240));

        Quick_Check_Font_Label.setFont(new java.awt.Font("新宋体", 1, 26)); // NOI18N
        Quick_Check_Font_Label.setForeground(new java.awt.Color(132, 132, 132));
        Quick_Check_Font_Label.setText("垃圾清理");
        mainLayeredPane.setLayer(Quick_Check_Font_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Quick_Check_Font_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 750, 130, 60));

        Quick_Check_IMAGE_Label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/Quick_Check.png"))); // NOI18N
        mainLayeredPane.setLayer(Quick_Check_IMAGE_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Quick_Check_IMAGE_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 580, 120, 170));

        Defense_Center_Area_Button.setFont(new java.awt.Font("宋体", 0, 30)); // NOI18N
        Defense_Center_Area_Button.setFocusPainted(false);
        Defense_Center_Area_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                Defense_Center_Area_ButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                Defense_Center_Area_ButtonMouseExited(evt);
            }
        });
        Defense_Center_Area_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Defense_Center_Area_ButtonActionPerformed(evt);
            }
        });
        mainLayeredPane.add(Defense_Center_Area_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 580, 200, 220));

        Defense_Center_Font_Label.setFont(new java.awt.Font("新宋体", 1, 26)); // NOI18N
        Defense_Center_Font_Label.setForeground(new java.awt.Color(132, 132, 132));
        Defense_Center_Font_Label.setText("防护中心");
        mainLayeredPane.setLayer(Defense_Center_Font_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Defense_Center_Font_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 750, 120, 60));

        Defense_Center_IMAGE_Label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/DefenseCenter.png"))); // NOI18N
        mainLayeredPane.setLayer(Defense_Center_IMAGE_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Defense_Center_IMAGE_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 580, 130, 160));

        Access_Control_Area_Button.setFont(new java.awt.Font("宋体", 0, 30)); // NOI18N
        Access_Control_Area_Button.setFocusPainted(false);
        Access_Control_Area_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                Access_Control_Area_ButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                Access_Control_Area_ButtonMouseExited(evt);
            }
        });
        Access_Control_Area_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Access_Control_Area_ButtonActionPerformed(evt);
            }
        });
        mainLayeredPane.add(Access_Control_Area_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 600, 210, 230));

        Access_Control_Font_Label.setFont(new java.awt.Font("新宋体", 1, 26)); // NOI18N
        Access_Control_Font_Label.setForeground(new java.awt.Color(132, 132, 132));
        Access_Control_Font_Label.setText("访问控制");
        mainLayeredPane.setLayer(Access_Control_Font_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Access_Control_Font_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 760, 130, 40));

        Access_Control_IMAGE_Label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/AccessControl.png"))); // NOI18N
        mainLayeredPane.setLayer(Access_Control_IMAGE_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Access_Control_IMAGE_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(700, 590, 150, 140));

        Security_Tools_Area_Button.setFont(new java.awt.Font("宋体", 0, 30)); // NOI18N
        Security_Tools_Area_Button.setFocusPainted(false);
        Security_Tools_Area_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                Security_Tools_Area_ButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                Security_Tools_Area_ButtonMouseExited(evt);
            }
        });
        Security_Tools_Area_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Security_Tools_Area_ButtonActionPerformed(evt);
            }
        });
        mainLayeredPane.add(Security_Tools_Area_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(980, 600, 210, 230));

        Security_Tools_Font_Label.setFont(new java.awt.Font("新宋体", 1, 26)); // NOI18N
        Security_Tools_Font_Label.setForeground(new java.awt.Color(132, 132, 132));
        Security_Tools_Font_Label.setText("更多工具");
        mainLayeredPane.setLayer(Security_Tools_Font_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Security_Tools_Font_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(1020, 760, 120, 40));

        Security_Tools_IMAGE_Label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/Security_Tools.png"))); // NOI18N
        mainLayeredPane.setLayer(Security_Tools_IMAGE_Label, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(Security_Tools_IMAGE_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 590, 150, 140));

        mainBKG.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/main_bkg.png"))); // NOI18N
        mainLayeredPane.add(mainBKG, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1230, 490));

        title.setFont(new java.awt.Font("微软雅黑", 0, 36)); // NOI18N
        title.setForeground(new java.awt.Color(242, 135, 24));
        title.setText("火苗正在保护您的电脑");
        mainLayeredPane.setLayer(title, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(title, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 130, -1, -1));

        subTitle.setFont(new java.awt.Font("微软雅黑", 1, 36)); // NOI18N
        subTitle.setForeground(new java.awt.Color(204, 0, 51));
        subTitle.setText("火苗安全");
        mainLayeredPane.setLayer(subTitle, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(subTitle, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 10, -1, -1));

        subLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/subLogo.png"))); // NOI18N
        mainLayeredPane.setLayer(subLogo, javax.swing.JLayeredPane.PALETTE_LAYER);
        mainLayeredPane.add(subLogo, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 190, 270, 260));

        DefenseCenterPane.setPreferredSize(new java.awt.Dimension(1265, 892));
        DefenseCenterPane.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                DefenseCenterPaneMouseDragged(evt);
            }
        });
        DefenseCenterPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                DefenseCenterPaneMousePressed(evt);
            }
        });
        DefenseCenterPane.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SecurityToolsBKG1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityToolsPane/Security_Tools_BKG.png"))); // NOI18N
        SecurityToolsBKG1.setToolTipText("");
        SecurityToolsBKG1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                SecurityToolsBKG1MouseDragged(evt);
            }
        });
        SecurityToolsBKG1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                SecurityToolsBKG1MouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                SecurityToolsBKG1MousePressed(evt);
            }
        });
        DefenseCenterPane.add(SecurityToolsBKG1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 890));

        Head1.setBackground(new java.awt.Color(248, 249, 249));
        DefenseCenterPane.setLayer(Head1, javax.swing.JLayeredPane.PALETTE_LAYER);
        DefenseCenterPane.add(Head1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1230, 50));

        returnButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityToolsPane/return.png"))); // NOI18N
        returnButton1.setAlignmentY(0.0F);
        returnButton1.setFocusPainted(false);
        returnButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                returnButton1MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                returnButton1MouseExited(evt);
            }
        });
        returnButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnButton1ActionPerformed(evt);
            }
        });
        DefenseCenterPane.setLayer(returnButton1, javax.swing.JLayeredPane.MODAL_LAYER);
        DefenseCenterPane.add(returnButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1024, 0, 50, 40));

        defenseLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/DefenseCenter.png"))); // NOI18N
        defenseLabel.setText("jLabel1");
        DefenseCenterPane.setLayer(defenseLabel, javax.swing.JLayeredPane.PALETTE_LAYER);
        DefenseCenterPane.add(defenseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 1220, 780));

        AccessControlPane.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                AccessControlPaneMouseDragged(evt);
            }
        });
        AccessControlPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                AccessControlPaneMousePressed(evt);
            }
        });
        AccessControlPane.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SecurityToolsBKG2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityToolsPane/Security_Tools_BKG.png"))); // NOI18N
        SecurityToolsBKG2.setToolTipText("");
        SecurityToolsBKG2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                SecurityToolsBKG2MouseDragged(evt);
            }
        });
        SecurityToolsBKG2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                SecurityToolsBKG2MouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                SecurityToolsBKG2MousePressed(evt);
            }
        });
        AccessControlPane.add(SecurityToolsBKG2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1240, 880));

        Head2.setBackground(new java.awt.Color(248, 249, 249));
        AccessControlPane.setLayer(Head2, javax.swing.JLayeredPane.PALETTE_LAYER);
        AccessControlPane.add(Head2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1230, 50));

        returnButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityToolsPane/return.png"))); // NOI18N
        returnButton2.setAlignmentY(0.0F);
        returnButton2.setFocusPainted(false);
        returnButton2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                returnButton2MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                returnButton2MouseExited(evt);
            }
        });
        returnButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnButton2ActionPerformed(evt);
            }
        });
        AccessControlPane.setLayer(returnButton2, javax.swing.JLayeredPane.MODAL_LAYER);
        AccessControlPane.add(returnButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1024, 0, 50, 40));

        accessControl.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/AccessControl.png"))); // NOI18N
        AccessControlPane.setLayer(accessControl, javax.swing.JLayeredPane.PALETTE_LAYER);
        AccessControlPane.add(accessControl, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 1220, 470));

        SecurityToolsPane.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                SecurityToolsPaneMouseDragged(evt);
            }
        });
        SecurityToolsPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                SecurityToolsPaneMousePressed(evt);
            }
        });
        SecurityToolsPane.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SecurityToolsBKG.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityToolsPane/Security_Tools_BKG.png"))); // NOI18N
        SecurityToolsBKG.setToolTipText("");
        SecurityToolsBKG.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                SecurityToolsBKGMouseDragged(evt);
            }
        });
        SecurityToolsBKG.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                SecurityToolsBKGMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                SecurityToolsBKGMousePressed(evt);
            }
        });
        SecurityToolsPane.add(SecurityToolsBKG, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1230, 870));

        Head.setBackground(new java.awt.Color(248, 249, 249));
        SecurityToolsPane.setLayer(Head, javax.swing.JLayeredPane.PALETTE_LAYER);
        SecurityToolsPane.add(Head, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1230, 50));

        returnButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityToolsPane/return.png"))); // NOI18N
        returnButton.setAlignmentY(0.0F);
        returnButton.setFocusPainted(false);
        returnButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                returnButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                returnButtonMouseExited(evt);
            }
        });
        returnButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnButtonActionPerformed(evt);
            }
        });
        SecurityToolsPane.setLayer(returnButton, javax.swing.JLayeredPane.MODAL_LAYER);
        SecurityToolsPane.add(returnButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1024, 0, 50, 40));

        securityTools.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/SecurityTools.png"))); // NOI18N
        SecurityToolsPane.setLayer(securityTools, javax.swing.JLayeredPane.PALETTE_LAYER);
        SecurityToolsPane.add(securityTools, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 70, 1190, 590));

        existButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/main_close.png"))); // NOI18N
        existButton.setAlignmentY(0.0F);
        existButton.setFocusPainted(false);
        existButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                existButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                existButtonMouseExited(evt);
            }
        });
        existButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                existButtonActionPerformed(evt);
            }
        });

        moreBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/main_more.png"))); // NOI18N
        moreBtn.setAlignmentY(0.0F);
        moreBtn.setFocusPainted(false);
        moreBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                moreBtnMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                moreBtnMouseExited(evt);
            }
        });
        moreBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                moreBtnActionPerformed(evt);
            }
        });

        minimizeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/flames/images/mainFrame/main_minimize.png"))); // NOI18N
        minimizeButton.setAlignmentY(0.0F);
        minimizeButton.setFocusPainted(false);
        minimizeButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                minimizeButtonMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                minimizeButtonMouseExited(evt);
            }
        });
        minimizeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                minimizeButtonActionPerformed(evt);
            }
        });

        MenuArea.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MenuAreaMouseExited(evt);
            }
        });

        ShadowLayeredPane.setLayer(mainLayeredPane, javax.swing.JLayeredPane.DEFAULT_LAYER);
        ShadowLayeredPane.setLayer(DefenseCenterPane, javax.swing.JLayeredPane.DEFAULT_LAYER);
        ShadowLayeredPane.setLayer(AccessControlPane, javax.swing.JLayeredPane.DEFAULT_LAYER);
        ShadowLayeredPane.setLayer(SecurityToolsPane, javax.swing.JLayeredPane.DEFAULT_LAYER);
        ShadowLayeredPane.setLayer(existButton, javax.swing.JLayeredPane.PALETTE_LAYER);
        ShadowLayeredPane.setLayer(moreBtn, javax.swing.JLayeredPane.PALETTE_LAYER);
        ShadowLayeredPane.setLayer(minimizeButton, javax.swing.JLayeredPane.MODAL_LAYER);
        ShadowLayeredPane.setLayer(MenuArea, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout ShadowLayeredPaneLayout = new javax.swing.GroupLayout(ShadowLayeredPane);
        ShadowLayeredPane.setLayout(ShadowLayeredPaneLayout);
        ShadowLayeredPaneLayout.setHorizontalGroup(
                ShadowLayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(DefenseCenterPane, javax.swing.GroupLayout.PREFERRED_SIZE, 1232, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                .addGap(1081, 1081, 1081)
                                .addComponent(moreBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                .addGap(1081, 1081, 1081)
                                .addComponent(MenuArea, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                .addGap(1141, 1141, 1141)
                                .addComponent(minimizeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(SecurityToolsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 1235, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(ShadowLayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(mainLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                .addComponent(AccessControlPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                        .addGap(1185, 1185, 1185)
                                        .addComponent(existButton, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        ShadowLayeredPaneLayout.setVerticalGroup(
                ShadowLayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(AccessControlPane)
                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                .addGroup(ShadowLayeredPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(DefenseCenterPane, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                                .addGap(5, 5, 5)
                                                .addComponent(moreBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                                .addGap(5, 5, 5)
                                                .addComponent(existButton))
                                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                                .addGap(73, 73, 73)
                                                .addComponent(MenuArea, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                                .addGap(5, 5, 5)
                                                .addComponent(minimizeButton))
                                        .addGroup(ShadowLayeredPaneLayout.createSequentialGroup()
                                                .addGap(5, 5, 5)
                                                .addComponent(SecurityToolsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 875, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(mainLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                                .addComponent(ShadowLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                                .addComponent(ShadowLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    //切换退出按钮的样式
    private void toggleExistButtonStyle(javax.swing.JButton button) {
        if (button.isContentAreaFilled()) {
            button.setContentAreaFilled(false);
        } else {
            button.setContentAreaFilled(true);
            button.setBackground(Color.red);
        }
    }

    // 切换普通按钮的样式
    private void toggleNormalButtonStyle(javax.swing.JButton button) {
        if (button.isContentAreaFilled()) {
            button.setContentAreaFilled(false);
        } else {
            button.setContentAreaFilled(true);
            button.setBackground(Color.gray);
        }
    }

    // 关掉组件: 如汉堡菜单会传进来关掉
    private void closeDialog(Component comp) {
        if (comp != null) {
            comp.setVisible(false);
        }
    }

    // 使面板支持拖拽
    private void mainFrameMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mainFrameMousePressed
        closeDialog(menu);
        pressedPoint = evt.getPoint();// 记录鼠标坐标
    }//GEN-LAST:event_mainFrameMousePressed

    // 使面板支持拖拽
    private void formMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseDragged
        Point point = evt.getPoint();// 获取当前坐标
        Point locationPoint = getLocation();// 获取窗体坐标
        int x = locationPoint.x + point.x - pressedPoint.x;// 计算移动后的新坐标
        int y = locationPoint.y + point.y - pressedPoint.y;
        setLocation(x, y);// 改变窗体位置,（按钮可以使用边界布局,也可以使用绝对布局）

    }//GEN-LAST:event_formMouseDragged

    // 点击关闭按钮, 将触发这个方法, 退出程序
    private void existButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_existButtonActionPerformed
        System.exit(0);
    }//GEN-LAST:event_existButtonActionPerformed

    // 切换样式
    private void existButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_existButtonMouseEntered
        toggleExistButtonStyle(existButton);
    }//GEN-LAST:event_existButtonMouseEntered

    // 切换样式
    private void existButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_existButtonMouseExited
        toggleExistButtonStyle(existButton);
    }//GEN-LAST:event_existButtonMouseExited

    // 点击[垃圾清理]将触发到这个方法
    private void Quick_Check_Area_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Quick_Check_Area_ButtonActionPerformed
        QuickCheckFrame.runInstance();
    }//GEN-LAST:event_Quick_Check_Area_ButtonActionPerformed

    // 切换样式
    private void Quick_Check_Area_ButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Quick_Check_Area_ButtonMouseEntered
        // active 这个Label的样式
        this.activeLabelStyle(Quick_Check_Font_Label, Quick_Check_IMAGE_Label, "/flames/images/mainFrame/Quick_Check_Active.png");
    }//GEN-LAST:event_Quick_Check_Area_ButtonMouseEntered

    // 切换样式
    private void Quick_Check_Area_ButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Quick_Check_Area_ButtonMouseExited
        // 关掉 这个Label的样式
        this.closeActiveLabelStyle(Quick_Check_Font_Label, Quick_Check_IMAGE_Label, "/flames/images/mainFrame/Quick_Check.png");
    }//GEN-LAST:event_Quick_Check_Area_ButtonMouseExited

    // 切换样式
    private void Defense_Center_Area_ButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Defense_Center_Area_ButtonMouseEntered
        this.activeLabelStyle(Defense_Center_Font_Label, Defense_Center_IMAGE_Label, "/flames/images/mainFrame/DefenseCenter_Active.png");
    }//GEN-LAST:event_Defense_Center_Area_ButtonMouseEntered

    //
    private void Defense_Center_Area_ButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Defense_Center_Area_ButtonMouseExited
        this.closeActiveLabelStyle(Defense_Center_Font_Label, Defense_Center_IMAGE_Label, "/flames/images/mainFrame/DefenseCenter.png");
    }//GEN-LAST:event_Defense_Center_Area_ButtonMouseExited

    // 关掉主界面，显示[防护中心]面板
    private void Defense_Center_Area_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Defense_Center_Area_ButtonActionPerformed
        mainLayeredPane.setVisible(false);
        mainLayeredPane.setEnabled(false);
        DefenseCenterPane.setVisible(true);
        DefenseCenterPane.setEnabled(true);
        validate();
        repaint();
    }//GEN-LAST:event_Defense_Center_Area_ButtonActionPerformed

    // 切换样式
    private void Access_Control_Area_ButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Access_Control_Area_ButtonMouseEntered
        this.activeLabelStyle(Access_Control_Font_Label, Access_Control_IMAGE_Label, "/flames/images/mainFrame/AccessControl_Active.png");
    }//GEN-LAST:event_Access_Control_Area_ButtonMouseEntered

    // 切换样式
    private void Access_Control_Area_ButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Access_Control_Area_ButtonMouseExited
        this.closeActiveLabelStyle(Access_Control_Font_Label, Access_Control_IMAGE_Label, "/flames/images/mainFrame/AccessControl.png");
    }//GEN-LAST:event_Access_Control_Area_ButtonMouseExited

    // 关掉主界面面板，显示[访问控制]面板
    private void Access_Control_Area_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Access_Control_Area_ButtonActionPerformed
        mainLayeredPane.setVisible(false);
        mainLayeredPane.setEnabled(false);
        AccessControlPane.setVisible(true);
        AccessControlPane.setEnabled(true);
        validate();
        repaint();
    }//GEN-LAST:event_Access_Control_Area_ButtonActionPerformed

    // 切换样式
    private void Security_Tools_Area_ButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Security_Tools_Area_ButtonMouseEntered
        this.activeLabelStyle(Security_Tools_Font_Label, Security_Tools_IMAGE_Label, "/flames/images/mainFrame/Security_Tools_Active.png");
    }//GEN-LAST:event_Security_Tools_Area_ButtonMouseEntered

    // 切换样式
    private void Security_Tools_Area_ButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Security_Tools_Area_ButtonMouseExited
        this.closeActiveLabelStyle(Security_Tools_Font_Label, Security_Tools_IMAGE_Label, "/flames/images/mainFrame/Security_Tools.png");
    }//GEN-LAST:event_Security_Tools_Area_ButtonMouseExited

    // 关掉主界面，显示 SecurityToolsPane
    private void Security_Tools_Area_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Security_Tools_Area_ButtonActionPerformed
        mainLayeredPane.setVisible(false);
        mainLayeredPane.setEnabled(false);
        SecurityToolsPane.setVisible(true);
        SecurityToolsPane.setEnabled(true);
        validate();
        repaint();

    }//GEN-LAST:event_Security_Tools_Area_ButtonActionPerformed

    // 切换样式
    private void minimizeButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_minimizeButtonMouseEntered
        toggleNormalButtonStyle(minimizeButton);
    }//GEN-LAST:event_minimizeButtonMouseEntered

    // 切换样式
    private void minimizeButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_minimizeButtonMouseExited
        toggleNormalButtonStyle(minimizeButton);
    }//GEN-LAST:event_minimizeButtonMouseExited

    // 最小化按钮 点击将触发该方法
    private void minimizeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_minimizeButtonActionPerformed
        this.setExtendedState(ICONIFIED);  // 让窗体最小化
    }//GEN-LAST:event_minimizeButtonActionPerformed

    // 使面板支持拖拽
    private void SecurityToolsPaneMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsPaneMousePressed
        this.mainFrameMousePressed(evt);
    }//GEN-LAST:event_SecurityToolsPaneMousePressed

    // 使面板支持拖拽
    private void SecurityToolsPaneMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsPaneMouseDragged
        this.formMouseDragged(evt);
    }//GEN-LAST:event_SecurityToolsPaneMouseDragged

    // 使面板支持拖拽
    private void SecurityToolsBKGMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKGMousePressed
        mainFrameMousePressed(evt);
    }//GEN-LAST:event_SecurityToolsBKGMousePressed

    // 使面板支持拖拽
    private void SecurityToolsBKGMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKGMouseDragged
        formMouseDragged(evt);
    }//GEN-LAST:event_SecurityToolsBKGMouseDragged

    // 切换样式
    private void returnButtonMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_returnButtonMouseEntered
        toggleNormalButtonStyle(returnButton);
    }//GEN-LAST:event_returnButtonMouseEntered

    // 切换样式
    private void returnButtonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_returnButtonMouseExited
        toggleNormalButtonStyle(returnButton);
    }//GEN-LAST:event_returnButtonMouseExited

    // 在[更多工具]面板, 点击右上方[返回]按钮, 触发此方法
    private void returnButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnButtonActionPerformed
        SecurityToolsPane.setVisible(false);
        SecurityToolsPane.setEnabled(false);
        mainLayeredPane.setVisible(true);
        mainLayeredPane.setEnabled(true);
        validate();
        repaint();
    }//GEN-LAST:event_returnButtonActionPerformed

    // 切换样式
    private void moreBtnMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_moreBtnMouseEntered
        toggleNormalButtonStyle(moreBtn);
    }//GEN-LAST:event_moreBtnMouseEntered

    // 切换样式
    private void moreBtnMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_moreBtnMouseExited
        toggleNormalButtonStyle(moreBtn);
    }//GEN-LAST:event_moreBtnMouseExited

    // 点击'汉堡菜单', 触发此方法
    private void moreBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_moreBtnActionPerformed
        // 设置汉堡包, 菜单
        if (menu == null) {
            menu = new MenuDialog(this, false);
        }
        menu.setLocationRelativeTo(MenuArea);
        menu.setVisible(true);

    }//GEN-LAST:event_moreBtnActionPerformed

    private void SecurityToolsBKGMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKGMouseExited

    }//GEN-LAST:event_SecurityToolsBKGMouseExited

    private void MenuAreaMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MenuAreaMouseExited

    }//GEN-LAST:event_MenuAreaMouseExited

    // 使面板支持拖拽
    private void SecurityToolsBKG1MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKG1MouseDragged
        formMouseDragged(evt);
    }//GEN-LAST:event_SecurityToolsBKG1MouseDragged

    private void SecurityToolsBKG1MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKG1MouseExited

    }//GEN-LAST:event_SecurityToolsBKG1MouseExited

    // 使面板支持拖拽
    private void SecurityToolsBKG1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKG1MousePressed
        mainFrameMousePressed(evt);
    }//GEN-LAST:event_SecurityToolsBKG1MousePressed

    // 切换样式
    private void returnButton1MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_returnButton1MouseEntered
        toggleNormalButtonStyle(returnButton1);
    }//GEN-LAST:event_returnButton1MouseEntered

    // 切换样式
    private void returnButton1MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_returnButton1MouseExited
        toggleNormalButtonStyle(returnButton1);
    }//GEN-LAST:event_returnButton1MouseExited

    private void returnButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnButton1ActionPerformed
        // 在[防护中心]面板, 点击右上方[返回]按钮, 触发此方法
        DefenseCenterPane.setVisible(false);
        DefenseCenterPane.setEnabled(false);
        mainLayeredPane.setVisible(true);
        mainLayeredPane.setEnabled(true);
        validate();
        repaint();
    }//GEN-LAST:event_returnButton1ActionPerformed

    private void DefenseCenterPaneMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_DefenseCenterPaneMouseDragged

    }//GEN-LAST:event_DefenseCenterPaneMouseDragged

    private void DefenseCenterPaneMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_DefenseCenterPaneMousePressed

    }//GEN-LAST:event_DefenseCenterPaneMousePressed

    // 使面板支持拖拽
    private void SecurityToolsBKG2MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKG2MouseDragged
        formMouseDragged(evt);
    }//GEN-LAST:event_SecurityToolsBKG2MouseDragged


    private void SecurityToolsBKG2MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKG2MouseExited

    }//GEN-LAST:event_SecurityToolsBKG2MouseExited

    // 使面板支持拖拽
    private void SecurityToolsBKG2MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SecurityToolsBKG2MousePressed
        mainFrameMousePressed(evt);
    }//GEN-LAST:event_SecurityToolsBKG2MousePressed

    // 切换样式
    private void returnButton2MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_returnButton2MouseEntered
        toggleNormalButtonStyle(returnButton2);
    }//GEN-LAST:event_returnButton2MouseEntered

    // 切换样式
    private void returnButton2MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_returnButton2MouseExited
        toggleNormalButtonStyle(returnButton2);
    }//GEN-LAST:event_returnButton2MouseExited

    private void returnButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnButton2ActionPerformed
        // 在[访问控制]面板, 点击右上方[返回]按钮, 触发此方法
        AccessControlPane.setVisible(false);
        AccessControlPane.setEnabled(false);
        mainLayeredPane.setVisible(true);
        mainLayeredPane.setEnabled(true);
        validate();
        repaint();
    }//GEN-LAST:event_returnButton2ActionPerformed

    private void AccessControlPaneMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_AccessControlPaneMouseDragged

    }//GEN-LAST:event_AccessControlPaneMouseDragged

    private void AccessControlPaneMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_AccessControlPaneMousePressed

    }//GEN-LAST:event_AccessControlPaneMousePressed


    public void activeLabelStyle(javax.swing.JLabel label, javax.swing.JLabel image, String imgURL) {
        label.setForeground(ACTIVE_COLOR);  // 设置字体的颜色
        image.setIcon(new javax.swing.ImageIcon(getClass().getResource(imgURL)));   // 设置图案的颜色
    }

    public void closeActiveLabelStyle(javax.swing.JLabel label, javax.swing.JLabel image, String imgURL) {
        label.setForeground(NORMAL_COLOR);
        image.setIcon(new javax.swing.ImageIcon(getClass().getResource(imgURL)));
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        System.setProperty("sun.java2d.noddraw", "true");
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                MainFrame mainFrame = new MainFrame();
                mainFrame.setVisible(true);
                mainFrame.existButton.setBorderPainted(false);
                mainFrame.existButton.setMargin(new Insets(0, 0, 0, 0));
                mainFrame.existButton.setContentAreaFilled(false);

                mainFrame.minimizeButton.setBorderPainted(false);
                mainFrame.minimizeButton.setMargin(new Insets(0, 0, 0, 0));
                mainFrame.minimizeButton.setContentAreaFilled(false);

                mainFrame.Quick_Check_Area_Button.setBorderPainted(false);
                mainFrame.Quick_Check_Area_Button.setMargin(new Insets(0, 0, 0, 0));
                mainFrame.Quick_Check_Area_Button.setContentAreaFilled(false);

                mainFrame.moreBtn.setBorderPainted(false);
                mainFrame.moreBtn.setMargin(new Insets(0, 0, 0, 0));
                mainFrame.moreBtn.setContentAreaFilled(false);

            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLayeredPane AccessControlPane;
    private javax.swing.JButton Access_Control_Area_Button;
    private javax.swing.JLabel Access_Control_Font_Label;
    private javax.swing.JLabel Access_Control_IMAGE_Label;
    private javax.swing.JLayeredPane DefenseCenterPane;
    private javax.swing.JButton Defense_Center_Area_Button;
    private javax.swing.JLabel Defense_Center_Font_Label;
    private javax.swing.JLabel Defense_Center_IMAGE_Label;
    private javax.swing.JLabel Head;
    private javax.swing.JLabel Head1;
    private javax.swing.JLabel Head2;
    private javax.swing.JLabel MenuArea;
    private javax.swing.JButton Quick_Check_Area_Button;
    private javax.swing.JLabel Quick_Check_Font_Label;
    private javax.swing.JLabel Quick_Check_IMAGE_Label;
    private javax.swing.JLabel SecurityToolsBKG;
    private javax.swing.JLabel SecurityToolsBKG1;
    private javax.swing.JLabel SecurityToolsBKG2;
    private javax.swing.JLayeredPane SecurityToolsPane;
    private javax.swing.JButton Security_Tools_Area_Button;
    private javax.swing.JLabel Security_Tools_Font_Label;
    private javax.swing.JLabel Security_Tools_IMAGE_Label;
    private javax.swing.JLayeredPane ShadowLayeredPane;
    private javax.swing.JLabel accessControl;
    private javax.swing.JLabel defenseLabel;
    private javax.swing.JLabel downSide;
    private javax.swing.JButton existButton;
    private javax.swing.JLabel mainBKG;
    private javax.swing.JLayeredPane mainLayeredPane;
    private javax.swing.JButton minimizeButton;
    private javax.swing.JButton moreBtn;
    private javax.swing.JButton returnButton;
    private javax.swing.JButton returnButton1;
    private javax.swing.JButton returnButton2;
    private javax.swing.JLabel securityTools;
    private javax.swing.JLabel subLogo;
    private javax.swing.JLabel subTitle;
    private javax.swing.JLabel title;
    // End of variables declaration//GEN-END:variables
}


